<?php
namespace app\appin\service;

class BaseService
{
	protected static $_init = [];
	
	/**
	 * 单例实例 防止路由反复匹配
	 */
	public static function init( $app = NULL )
	{
		$facadeClassName = static::getFacadeName();
		
		if ( !isset( self::$_init[$facadeClassName] ) ) {
			self::$_init[$facadeClassName] = new static();
		}
		return self::$_init[$facadeClassName];
	}
}